<template>
  <!-- 公共loading组件 -->
  <load :loading=loading />
  <!-- 主体内容 -->
  <div v-if="loading == false">
    <!-- 公共标题组件 -->
    <Header v-on:closeMenu="closeMenu" :show="showRef" />
    <main id="main">
      <!-- 公共导航组件 -->
      <Menu v-on:showMenuByChild="showMenuByChild" />
      <!-- 主体内容 -->
      <section class="tags ">
        <header class="header" style="text-align: center;">
          <h1 class="header-title">导入excel文件数据统计</h1>
        </header>
        <div class="tags-container padding-bottom">
          <div >sheet名：<el-input v-model="sheet" style="width: 300px" placeholder="请输入需要统计sheet名称，注意不要有空格" /></div>
          <br>
          <div >统计列：<el-input v-model="column" style="width: 300px" placeholder="请输入需要统计的数据列，英文字母大写" /></div>
          <br>
          <div >起始行：<el-input v-model="start" style="width: 300px" placeholder="请输入需要统计的数据起始行" /></div>
          <br>
          <div >结束行：<el-input v-model="end" style="width: 300px" placeholder="请输入需要统计的数据结束行" /></div>
          <br>
          <!-- 上传按钮 -->
          <div >
            <el-upload
              v-model:file-list="fileList"
              class="upload-demo"
              action="/index.php/user/uploadExcelFile"
              multiple
              :on-preview="handlePreview"
              :on-remove="handleRemove"
              :before-remove="beforeRemove"
              :limit="1"
              :on-exceed="handleExceed"
              :on-success="uploadSuccess"
            >
              <el-button type="primary">点击上传excel</el-button>
            </el-upload>
          </div>
          <br>
          <!-- 确定按钮 -->
          <div >
            <el-button type="success" @click="clickOK">确定</el-button>
          </div>
        </div>
      </section>
    </main>
    <!-- 抽屉组件 -->
    <drawer v-on:showMenuByChild="showMenuByChild"></drawer>
    <!-- 置顶和IM按钮 -->
    <TopIM />
    <!-- 网站底部组件 -->
    <Footer />
  </div>
</template>

<style lang="scss" scoped>
  @import "/@/assets/css/pc/excel.scss";
</style>

<script lang="ts">
// 引入js文件
import excel from "/@/assets/js/pc/excel";
// 使用js对象
export default {
  ...excel,
};
</script>
